package com.sunlee.common.core.utils;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

/**
 * @author sunlee
 * @date 2023-04-23
 */
public class EnvUtil {

    private static String env;

    public static String getEnv() {
        return env;
    }

    @Value("${spring.profiles.active}")
    public void setEnv(String env) {
        EnvUtil.env = env;
    }

    public static boolean isPro() {
        return "pro".equals(getEnv());
    }

    public static boolean isDev() {
        return "dev".equals(getEnv());
    }
}
